<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>飞机大战</title>
  </head>
  <body>
    <div id="app">
      <img
        src="./play.svg"
        alt=""
        autofocus
        tabindex="0"
        @keydown.right="x+=10"
        @keydown.down="y+=10"
        @keydown.left="x-=10"
        @keydown.up="y-=10"
        :style="{translate:`${x}px ${y}px`}"
      />
    </div>
    <script src="./vue.min.js"></script>
    <script>
      const app = new Vue({
        el: "#app",
        data: {
          x: 0,
          y: 0,
        },
      });
    </script>
  </body>
</html>
